package cn.net.Socket;

import static cn.net.Socket.ChatClient.stop;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Socket;

public class ChatClientMain extends Thread{
	Socket sc;
	public ChatClientMain(Socket sc){
		this.sc=sc;
	}
	
	public void run(){
		try {
			
			InputStream is = sc.getInputStream();
			BufferedReader br = new BufferedReader(new InputStreamReader(is));
			String data = br.readLine();
			while(true){
				System.out.println(data);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
}
